import React, { useContext } from 'react';

import { IWelcomeBodyLayout } from '@/pages/HomePage/type';

import { WelcomeContext } from '@/pages/HomePage/hooks';
import { Empty } from 'antd';

export const WelcomeBodyLayout: React.FC<IWelcomeBodyLayout> = ({
  children,
}) => {
  const { prefixCls } = useContext(WelcomeContext);
  return (
    <div className={prefixCls + 'body'}>
      {children ?? (
        <Empty
          image={Empty.PRESENTED_IMAGE_SIMPLE}
          description={'暂无描述'}
          style={{
            height: '100%',
            width: '100%',
          }}
        />
      )}
    </div>
  );
};
